/**  
* @Title: Permission.java  
* @Package com.clps.dev.sms.entity  
* @Description:   Permission  实体类
* @author RuiShan.Yang  
* @date 2018-11-27 14:03:48 
* @version V1.0  
*/

package com.clps.dev.sms.entity.sm;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.UpdateTimestamp;

/**  
* @ClassName: Permission  
* @Description: 权限实体类
* @since JDK 1.8 
* @author RuiShan.Yang  
* @date 2018-11-27 14:03:48  
* 
*/
@Entity
@Table(name = "sm_permission")
public class Permission implements java.io.Serializable {
	/**
	 * serialVersionUID
	 * @since JDK 1.8
	 */
	private static final long serialVersionUID = 1L;
	private int permissionCreatedEmployeeId;// 创建人名
	private String permissionCreatedTime;// 创建时间
	private String permissionDescription;// 权限描述
	private Integer permissionId; // 权限编号
	private String permissionName; // 权限名称
	private int permissionUpdatedEmployeeId;// 更新人名
	private Timestamp permissionUpdatedTime;// 更新时间

	/**  
	* 创建一个新的实例 Permission.  
	*/
	public Permission() {
	}

	public Permission(String permissionName, String permissionDescription, int permissionCreatedEmployeeId,
			String permissionCreatedTime, int permissionUpdatedEmployeeId) {
		this.permissionName = permissionName;
		this.permissionDescription = permissionDescription;
		this.permissionCreatedEmployeeId = permissionCreatedEmployeeId;
		this.permissionCreatedTime = permissionCreatedTime;
		this.permissionUpdatedEmployeeId = permissionUpdatedEmployeeId;

	}

	/**
	* <p>Title: equals</p>  
	* <p>Description: </p>  
	* @param obj
	* @return  
	* @see java.lang.Object#equals(java.lang.Object)  
	*/
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (this.getClass() != obj.getClass()) {
			return false;
		}

		Permission permission = (Permission) obj;
		return this.permissionId.equals(permission.getPermissionId());
	}

	@Column(name = "PERMISSION_CREATED_EMPLOYEE_ID", nullable = false, updatable = false)
	public final int getPermissionCreatedEmployeeId() {
		return permissionCreatedEmployeeId;
	}

	
	@Column(name = "PERMISSION_CREATED_TIME",length = 50, nullable = false, updatable = false)
	public final String getPermissionCreatedTime() {
		return permissionCreatedTime;
	}
	@Column(name = "PERMISSION_DESCRIPTION")
	public final String getPermissionDescription() {
		return permissionDescription;
	}
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "PERMISSION_ID", length = 20)
	public final Integer getPermissionId() {
		return permissionId;
	}
	@Column(name = "PERMISSION_NAME", length = 50)
	public final String getPermissionName() {
		return permissionName;
	}
	@Column(name = "PERMISSION_UPDATED_EMPLOYEE_ID", nullable = false)
	public final int getPermissionUpdatedEmployeeId() {
		return permissionUpdatedEmployeeId;
	}
	@UpdateTimestamp
	@Column(name = "PERMISSION_UPDATED_TIME",columnDefinition = "TIMESTAMP")
	public final Timestamp getPermissionUpdatedTime() {
		return permissionUpdatedTime;
	}
	/**
	* <p>Title: hashCode</p>  
	* <p>Description: </p>  
	* @return  departmentId
	* @see java.lang.Object#hashCode()  
	*/
	@Override
	public int hashCode() {
		return this.permissionId;
	}
	
	public final void setPermissionCreatedEmployeeId(int permissionCreatedEmployeeId) {
		this.permissionCreatedEmployeeId = permissionCreatedEmployeeId;
	}

	public final void setPermissionCreatedTime(String permissionCreatedTime) {
		this.permissionCreatedTime = permissionCreatedTime;
	}

	public final void setPermissionDescription(String permissionDescription) {
		this.permissionDescription = permissionDescription;
	}

	public final void setPermissionId(Integer permissionId) {
		this.permissionId = permissionId;
	}

	public final void setPermissionName(String permissionName) {
		this.permissionName = permissionName;
	}

	public final void setPermissionUpdatedEmployeeId(int permissionUpdatedEmployeeId) {
		this.permissionUpdatedEmployeeId = permissionUpdatedEmployeeId;
	}

	public final void setPermissionUpdatedTime(Timestamp permissionUpdatedTime) {
		this.permissionUpdatedTime = permissionUpdatedTime;
	}

	@Override
	public String toString() {
		return "Permission [permissionId=" + permissionId + ", permissionName=" + permissionName
				+ ", permissionDescription=" + permissionDescription + ", permissionCreatedEmployeeId="
				+ permissionCreatedEmployeeId + ", permissionCreatedTime=" + permissionCreatedTime
				+ ", permissionUpdatedEmployeeId=" + permissionUpdatedEmployeeId + ", permissionUpdatedTime="
				+ permissionUpdatedTime + "]";
	}
	 
	
	
	
	
}
